package com.teamfractal.fracdustry.common.tools;

import net.minecraft.core.BlockPos;
import net.minecraft.world.level.Level;

import static com.teamfractal.fracdustry.common.tools.worldCheck.isNoBlockAboveAt;

public class CalculateWindPower {
    public static int calculateVawt(Level world, BlockPos pos){
        int weatherFactor = isNoBlockAboveAt(world, pos.above())?(int) (world.rainLevel * 10 + world.thunderLevel * 10):0;
        int heightFactor = pos.getY() - 25;
        return heightFactor > 0? (weatherFactor + heightFactor / 2) / 5:0;
    }
}
